Skip to content

Commit

Permalink
SCUMM HE: Fix compiling with HE v71+ disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleToonCat authored and sev- committed May 12, 2024
1 parent 267bfc9 commit 4d3f6b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/scumm/he/intern_he.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class Moonbase;
#endif

class ScummEngine_v60he : public ScummEngine_v6 {
#ifdef ENABLE_HE
friend class Moonbase;
#endif
protected:
enum SubOpType {
SO_ACTOR_DEFAULT_CLIPPED = 30,
Expand Down Expand Up @@ -77,8 +79,10 @@ class ScummEngine_v60he : public ScummEngine_v6 {
void setHETimer(int timer);
void pauseHETimers(bool pause);

#ifdef ENABLE_HE
public:
Moonbase *_moonbase;
#endif

public:
ScummEngine_v60he(OSystem *syst, const DetectorResult &dr);
Expand Down
2 changes: 2 additions & 0 deletions engines/scumm/he/script_v60he.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ Common::String ScummEngine_v60he::convertSavePathOld(const byte *src) {
}

Common::SeekableReadStream *ScummEngine_v60he::openFileForReading(const byte *fileName) {
#ifdef ENABLE_HE
if (_moonbase) {
Common::SeekableReadStream *substitutedFile = _moonbase->_map->substituteFile(fileName);
if (substitutedFile)
return substitutedFile;
}
#endif
Common::SeekableReadStream *saveFile = openSaveFileForReading(fileName);

if (saveFile)
Expand Down
2 changes: 2 additions & 0 deletions engines/scumm/scumm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,9 @@ ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr)

ScummEngine_v60he::ScummEngine_v60he(OSystem *syst, const DetectorResult &dr)
: ScummEngine_v6(syst, dr) {
#ifdef ENABLE_HE
_moonbase = 0;
#endif

memset(_hInFileTable, 0, sizeof(_hInFileTable));
memset(_hOutFileTable, 0, sizeof(_hOutFileTable));
Expand Down

0 comments on commit 4d3f6b7

Please sign in to comment.